<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户留言板</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<link href='https://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,700,600' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Raleway:400,100' rel='stylesheet' type='text/css'>
    
    <!-- Bootstrap -->
    <link rel="stylesheet" href="PAGE/css/bootstrap.min.css">
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="PAGE/css/font-awesome.min.css">
    
    <!-- Custom CSS -->
    <link rel="stylesheet" href="PAGE/css/owl.carousel.css">
    <link rel="stylesheet" href="PAGE/style.css">
    <link rel="stylesheet" href="PAGE/css/responsive.css">

  </head>
  
  <body>
     <div class="header-area">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <div class="user-menu">
                        <ul>
                                <li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user"></i> 我的账户</a></li>
                          <!--   <li><a href="#"><i class="fa fa-heart"></i>心愿单</a></li> -->
                            <li><a href="AddCartServlet?id=0"><i class="fa fa-user"></i>购物车</a></li>
                            <li><a href="OrderServlet?type=0"><i class="fa fa-user"></i> 订单信息</a></li>
                            
                            
                            <c:choose>
                            	<c:when test="${sessionScope.user.usersNickname eq null}">
                            	<li><a href="UserAndOrder/login.jsp"><i class="fa fa-user">用户登录</i>
                            	
                            	</c:when>
                            	<c:otherwise>
                            	<li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user">${sessionScope.user.usersNickname}</i>
                            	
                            	</c:otherwise>
                            </c:choose>
                            
                             </a></li>
                        </ul>
                    </div>
                </div>
                
                <div class="col-md-4">
                    <div class="header-right">
                        <ul class="list-unstyled list-inline">
                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">货币 :</span><span class="value">人民币 </span><b class="caret"></b></a>

                            </li>

                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">语言:</span><span class="value">简体中文</span><b class="caret"></b></a>
                                <ul class="dropdown-menu">

                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div> <!-- End header area -->
    
  
                    <div class="logo">
                        <div style="text-align: center;">
                            <form action="UserSearchServlet" method="post">
                            	<a href="./"><img src="PAGE/img/logo.png"   ></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			
                      			 <font style="font-style:微软雅黑;" size="5" color="#0C89CF">搜 索 商 品    </font>
                       			<input type="text" name="usersearch" placeholder="请输入搜索内容">
                                <input type="submit" value="搜索">
                            </form>  
                        </div>
                    </div>
                    
<!-- End site branding area -->
    
    <div class="mainmenu-area">
        <div class="container">
            <div class="row">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div> 
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li><a href="/eshop/PAGE/InterFace.jsp"">主页</a></li>
                        <li><a href="UserSearchServlet">商品页面</a></li>
                        <li><a href="ProductDetailsServlet?id=0">商品详情</a></li>
                        <li><a href="AddCartServlet?id=0">购物车</a></li>
                        <li><a href="OrderServlet?type=0">您的宝贝</a></li>
                        <li  class="active"><a href="EvaluateServlet?type=showEvaluate">留言板</a></li>
                        <%--
                        <li><a href="#">Category</a></li>
                        <li><a href="#">Others</a></li>
                        <li><a href="#">Contact</a></li>

                --%></div>  
            </div>
        </div>
    </div> <!-- End mainmenu area -->
    <div class="product-big-title-area">
			<div class="container">
				<div class="row">
					<div class="col-md-12">
						<div class="product-bit-title text-center">
							<h2>
						留 言 板 列 表
							</h2>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- End Page title area -->


		<div class="single-product-area">
			<div class="zigzag-bottom"></div>
			<div class="container">
				<div class="row">
					 <div class="col-md-4" style="width: 23%">
                    <div class="single-sidebar">
                        <h2 class="sidebar-title">搜 索 商 品</h2>
                        <form action="UserSearchServlet" method="post">
                       			<input type="text" name="usersearch" placeholder="请输入搜索内容">
                                <input type="submit" value="搜索">
                        </form>
                    </div>
                    
                   	<div class="single-sidebar">
							<h2 class="sidebar-title">
								其他商品
							</h2>
							
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-1.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=3">魅族MAX4</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										￥1699
									</ins>

								</div>
							</div>
							
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-b.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=23">NikonCOOLPIX P900s</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										￥7999
									</ins>
								</div>
							</div>
							
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-c.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=10">联想700S</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										￥5888
									</ins>
				
								</div>
							</div>
							<div class="thubmnail-recent">
								<img src="PAGE/img/product-thumb-d.jpg" class="recent-thumb"
									alt="">
								<h2>
									<a href="ProductDetailsServlet?id=15">戴尔ran</a>
								</h2>
								<div class="product-sidebar-price">
									<ins>
										$700.00
									</ins>
								</div>
							</div>
						</div>
                    
                  <div class="single-sidebar">
							<h2 class="sidebar-title">
								推 荐 商 品
							</h2>
							<ul>
								<li>
									<a href="ProductDetailsServlet?id=19">NikonCOOLPIX P330</a>
								</li>
								<li>
									<a href="ProductDetailsServlet?id=20">NikonCOOLPIX P900s</a>
								</li>

							</ul>
						</div>
                </div>

					<div class="col-md-8">
						<div class="product-content-right">
							<div class="woocommerce">
    <!-- 留言板 -->
    <!-- 展示留言 -->
    <table cellspacing="0" class="shop_table cart" style="width: 125%">
    	
    	<tr>
    	
    		<th width="20%" class="product-subtotal">留言序号</th>
    	<!-- 	<td width="20%">留言ID</td>  -->
    		<th width="40%" class="product-subtotal">留言内容</th> 
    		<th width="20%" class="product-subtotal">发表时间</th> 
    		<th width="20%" class="product-subtotal">商家回复</th>
	    					
    			
    	</tr>
		<c:forEach items="${evaluateBean}" var="e" varStatus="count">
	    	<tr>
	    		<td>${count.count }</td> 
	    	<!-- 	<td>${e.evaluateId }</td>  -->
	    		<td>${e.evaluateContent }</td> 
	    		<td>${e.evaluateDate}</td> 
	    		<!-- 
	    		<c:forEach items="${e.replayBeanList}" var="r">
	    			<td>
	    				商家回复：${r.replayContent }
	    				回复时间：${r.replayDate }
	    			</td>
	    		</c:forEach> -->
	    		<td>
	    			<table>
	    				
	    				<c:forEach items="${e.replayBeanList}" var="r"><tr>
	    					<td>${r.replayContent }${r.replayDate }</td>
	    					</tr>
	    				</c:forEach>
	    			</table>
	    		</td>	
	    	</tr>
    	</c:forEach>
    	<tr>
    		<td colspan="4">
    			当前第${p.pn }页，共${p.page }页&nbsp;&nbsp;&nbsp;   
    			
    			<a href="EvaluateServlet?pn=1&type=showEvaluate">首页</a>
    			<a href="EvaluateServlet?pn=${p.pn - 1 }&type=showEvaluate" >上一页</a>
    			<a href="EvaluateServlet?pn=${p.pn + 1 }&type=showEvaluate">下一页</a>
    			<a href="EvaluateServlet?pn=${p.page}&type=showEvaluate">尾页</a>
    		</td> 
    	</tr>
    </table>
    <!-- 写留言 -->
    <form action="EvaluateServlet?type=addEvaluate" method="post">
    	<table class="shop_table cart">
    		<tr>
    			<td>写留言</td>
    			<td><textarea name="eva" cols=40 rows=2></textarea></td>
				<td><input type="submit" value="提交留言"></td>
				
    		</tr>
    	</table>
    </form>
    
    
    <!-- 留言板 -->
  </body>
</html>
